//
//  RZEmojiBoardView.h
//  RZIM
//
//  Created by reyzhang on 2021/8/18.
//  表情面板view （主控件 UIScrollView）

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class RZEmojiBoardView;


/*!
 表情输入的回调
 */
@protocol RZEmojiViewDelegate <NSObject>
@optional

/*!
 点击表情的回调

 @param emojiView 表情输入的View
 @param string    点击的表情对应的字符串编码
 */
- (void)didTouchEmojiView:(RZEmojiBoardView *)emojiView touchedEmoji:(NSString *)string;

/*!
 点击发送按钮的回调

 @param emojiView  表情输入的View
 @param sendButton 发送按钮
 */
- (void)didSendButtonEvent:(RZEmojiBoardView *)emojiView sendButton:(UIButton *)sendButton;

@end



@interface RZEmojiBoardView : UIView <UIScrollViewDelegate> //实现scrollview的delegate
/*!
 当前的会话ID
 */
@property (nonatomic, strong) NSString *targetId;

/*!
 表情背景的View
 */
@property (nonatomic, strong) UIScrollView *emojiBackgroundView;

/*!
 表情输入的回调
 */
@property (nonatomic, weak) id<RZEmojiViewDelegate> delegate;

/*!
 表情区域的大小
 */
@property (nonatomic, assign, readonly) CGSize contentViewSize;

/**
 *  init
 *
 *  @param frame            frame
 *  @param delegate         实现RCEmojiViewDelegate的实体
 */
- (instancetype)initWithFrame:(CGRect)frame delegate:(id<RZEmojiViewDelegate>)delegate;
/*!
 加载表情Label
 */
- (void)loadLabelView;

/*!
发送按钮是否可点击
 */
- (void)enableSendButton:(BOOL)enableSend;
@end

NS_ASSUME_NONNULL_END
